package com.gduf.lsm.controller;

import cn.hutool.core.lang.Dict;
import com.gduf.lsm.common.Result;
import com.gduf.lsm.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author lsm
 * @Data
 */
@RestController
@RequestMapping("/graph")
public class GraphController {
    @Autowired
    private GraphService graphService;

    /**
     * 统计管理员、用户、老人数量
     * @return
     */
    @GetMapping("/manager/countRole")
    public Result countRole(){
        List<Dict> dictList=graphService.countRole();
        return Result.success(dictList);
    }

    /**
     * 统计申请数据状态
     * @return
     */
    @GetMapping("/manager/countApplyNumStatus")
    public Result countApplyNumStatus(){
        List<Dict> dictList=graphService.countApplyNumStatus();
        return Result.success(dictList);
    }

    /**
     * 统计申请数据类型
     * @return
     */
    @GetMapping("/manager/countApplyNumType")
    public Result countApplyNumType(){
        List<Dict> dictList=graphService.countApplyNumType();
        return Result.success(dictList);
    }

    /**
     * 流水账各类型次数统计
     * @return
     */
    @GetMapping("/user/countWaterBillType")
    public Result countWaterBillType(){
        List<Dict> dictList=graphService.countWaterBillType();
        return Result.success(dictList);
    }

    /**
     * 统计各类型金额
     * @return
     */
    @GetMapping("/user/countWBTypeMoney")
    public Result countWBTypeMoney(){
        List<Dict> dictList=graphService.countWBTypeMoney();
        return Result.success(dictList);
    }

    /**
     * 统计各具体类型数量
     * @return
     */
    @GetMapping("/user/countWBDetailType")
    public Result countWBDetailType(){
        List<Dict> dictList=graphService.countWBDetailType();
        return Result.success(dictList);
    }

    /**
     * 流水账各类型具体金额统计
     * @return
     */
    @GetMapping("/user/countWBDetailTypeMoney")
    public Result countWBDetailTypeMoney(){
        List<Dict> dictList=graphService.countWBDetailTypeMoney();
        return Result.success(dictList);
    }

    /**
     * 各服务评分
     * @return
     */
    @GetMapping("/serve/countServe")
    public Result countServe(){
        List<Dict> dictList=graphService.countServe();
        return Result.success(dictList);
    }

    /**
     * 养老服务状态统计
     * @return
     */
    @GetMapping("/serve/countOldServe")
    public Result countOldServe(){
        List<Dict> dictList=graphService.countOldServe();
        return Result.success(dictList);
    }

    /**
     * 社区服务统计
     * @return
     */
    @GetMapping("/serve/countCommServe")
    public Result countCommServe(){
        List<Dict> dictList=graphService.countCommServe();
        return Result.success(dictList);
    }

    /**
     * 统计公益活动与文化活动数量
     * @return
     */
    @GetMapping("/event/countAllAct")
    public Result countAllAct(){
        List<Dict> dictList=graphService.countAllAct();
        return Result.success(dictList);
    }

    /**
     * 统计公益活动状态
     * @return
     */
    @GetMapping("/event/countAct")
    public Result countAct(){
        List<Dict> dictList=graphService.countAct();
        return Result.success(dictList);
    }

    /**
     * 统计文化活动状态
     * @return
     */
    @GetMapping("/event/countCul")
    public Result countCul(){
        List<Dict> dictList=graphService.countCul();
        return Result.success(dictList);
    }

    /**
     * 通知对象统计
     * @return
     */
    @GetMapping("/info/countNotice")
    public Result countNotice(){
        List<Dict> dictList=graphService.countNotice();
        return Result.success(dictList);
    }

    /**
     * 咨询类型统计
     * @return
     */
    @GetMapping("/info/countNews")
    public Result countNews(){
        List<Dict> dictList=graphService.countNews();
        return Result.success(dictList);
    }

    /**
     * 反馈状态统计
     * @return
     */
    @GetMapping("/info/countFeedback")
    public Result countFeedback(){
        List<Dict> dictList=graphService.countFeedback();
        return Result.success(dictList);
    }

    /**
     * 登录页面显示服务得分表
     * @return
     */
    /*@GetMapping("/login/countServe")
    public Result countServeLogin(){
        List<Dict> dictList=graphService.countServeLogin();
        return Result.success(dictList);
    }*/
}
